<template>
  <div>
    <el-form label-suffix="：" label-position="left" style="display: flex;">
      <el-form-item label-width="55px" label="学期">
        <el-select v-model="selectList[0].val" size="mini" clearable placeholder="请选择学期" style="margin: 0 20px 0 -15px;">
          <el-option v-for="(item, index) in selectList[0].valList" :key="index" :label="item.name" :value="item.id" />
        </el-select>
      </el-form-item>
      <el-form-item label-width="85px" label="批次名称">
        <el-select v-model="selectList[1].val" size="mini" clearable placeholder="请选择批次名称" style="margin: 0 20px 0 -15px;">
          <el-option v-for="(item, index) in selectList[1].valList" :key="index" :label="item.name" :value="item.id" />
        </el-select>
      </el-form-item>
      <el-form-item label-width="90px" label="开课/停课">
        <el-select v-model="selectList[2].val" size="mini" clearable placeholder="请选择开课/停课" style="margin: 0 20px 0 -15px;">
          <el-option v-for="(item, index) in selectList[2].valList" :key="index" :label="item.name" :value="item.id" />
        </el-select>
      </el-form-item>
      <el-form-item label-width="40px" label="系">
        <el-select v-model="selectList[3].val" size="mini" clearable placeholder="请选择系" style="margin: 0 20px 0 -15px;" @change="handleChangeDepartment">
          <el-option v-for="(item, index) in selectList[3].valList" :key="index" :label="item.deptName" :value="item.id" />
        </el-select>
      </el-form-item>
      <el-form-item label-width="70px" label="教研室">
        <el-select v-model="selectList[4].val" size="mini" clearable placeholder="请选择教研室" style="margin: 0 20px 0 -15px;">
          <el-option v-for="(item, index) in selectList[4].valList" :key="index" :label="selectList[3].val === '' ? item.deptName : item.value" :value="selectList[3].val === '' ? item.id : item.code" />
        </el-select>
      </el-form-item>
      <el-form-item label-width="85px" label="课程编号">
        <el-input v-model="selectList[5].val" size="mini" clearable placeholder="请输入课程编号" style="margin: 0 20px 0 -15px;" />
      </el-form-item>
      <el-form-item label-width="85px" label="课程名称">
        <el-input v-model="selectList[6].val" size="mini" clearable placeholder="请输入课程名称" style="margin: 0 20px 0 -15px;" />
      </el-form-item>
      <el-form-item label-width="85px" label="主讲教员">
        <el-input v-model="selectList[7].val" size="mini" clearable placeholder="请输入主讲教员" style="margin: 0 20px 0 -15px;" />
      </el-form-item>
      <div class="button-style" style="min-width: 75px; margin-top: 6px;" @click="xxkkkgl_query_list">
        <img src="@/assets/assessment/icon-search.png" alt="" />
        <span>查询</span>
      </div>
    </el-form>
    <div style="display: flex;">
      <div class="button-style" style="border-color: #E76C16; background-color: #FEF2E8; margin-right: 15px;" @click="addXXK">
        <i class="el-icon-circle-plus-outline" style="color: #E76C16; margin-right: 5px;" />
        <span style="color: #E76C16;">添加选修课</span>
      </div>
<!--      <div class="button-style" style="border-color: #EEB617; background-color: #FFF4F2; margin-right: 15px;" @click="addPYJXTJXXK">-->
<!--        <i class="el-icon-download" style="color: #EEB617; margin-right: 5px;" />-->
<!--        <span style="color: #EEB617;">从培养计划添加选修课</span>-->
<!--      </div>-->
      <div class="button-style" style="border-color: #14BF6C; background-color: #F1FFF8; margin-right: 15px;" @click="setSZXXKYQ">
        <i class="el-icon-setting" style="color: #14BF6C; margin-right: 5px;" />
        <span style="color: #14BF6C;">设置选修课要求</span>
      </div>
      <div class="button-style" style="border-color: #4D2FDB; background-color: #F0EBFF; margin-right: 15px;" @click="setZXHYXRY">
        <i class="el-icon-setting" style="color: #4D2FDB; margin-right: 5px;" />
        <span style="color: #4D2FDB;">设置正选或预选人员</span>
      </div>
      <div class="button-style" style="border-color: #F05943; background-color: #FFEEF3; margin-right: 15px;" @click="deletedSelect">
        <i class="el-icon-delete" style="color: #F05943; margin-right: 5px;" />
        <span style="color: #F05943;">删除</span>
      </div>
    </div>
    <el-table
      :data="tableData"
      border
      class="xpaas-table-class"
      row-class-name="xpaas-row-class"
      cell-class-name="xpaas-cell-class"
      header-row-class-name="xpaas-header-row-class"
      header-cell-class-name="xpaas-header-cell-class"
      @selection-change="handleSelectionChange"
      style="margin: 15px auto;">
      <el-table-column
        prop=""
        label="选择"
        width="60"
        align="center"
        type="selection"
      >
      </el-table-column>
      <el-table-column
        prop="opreate"
        label="操作"
        align="center"
        min-width="500"
      >
        <template slot-scope="scope">
          <div
            style="
                display: flex;
                padding-left: 10px;
                justify-content: space-around;
              "
          >
            <div class="button-style" style="border-color: #14BF6C; background-color: #F1FFF8; margin-right: 15px;" @click="editRowInfo(scope.row)">
              <i class="el-icon-edit" style="color: #14BF6C; margin-right: 5px;" />
              <span style="color: #14BF6C;">修改</span>
            </div>
            <div class="button-style" style="border-color: #E76C16; background-color: #FEF2E8; margin-right: 15px;" @click="paike(scope.row)">
              <i class="el-icon-date" style="color: #E76C16; margin-right: 5px;" />
              <span style="color: #E76C16;">排课</span>
            </div>
            <div class="button-style" style="border-color: #71A1C8; background-color: #EFF9FF; margin-right: 15px;" @click="tiaozhengStudent(scope.row)">
              <i class="el-icon-refresh" style="color: #71A1C8; margin-right: 5px;" />
              <span style="color: #71A1C8;">调整学员</span>
            </div>
            <el-switch
              style="margin-top: 5px;"
              @change="changeClassStatus(scope.row)"
              v-model="scope.row.status"
              active-color="#13ce66"
              active-text="开课"
              inactive-text="停课"
              inactive-color="#ff4949">
            </el-switch>
          </div>
        </template>
      </el-table-column>
      <el-table-column
        prop="teachingClass"
        label="教学班"
        width="155"
        align="center"
      >
        <template slot-scope="scope">
          <span class="a-span" @click="toTeachingView(scope.row)">{{scope.row.classname}}</span>
        </template>
      </el-table-column>
      <el-table-column
        prop="classNumber"
        label="课程编号【课程名称】"
        width="200"
        align="center"
      >
        <template slot-scope="scope">
          <span class="a-span" @click="toClassNumberView(scope.row)">{{scope.row.coursenumber}}【{{scope.row.coursename}}】</span>
        </template>
      </el-table-column>
      <el-table-column
        prop="pkList"
        label="上课时间/主讲教员/上课地点"
        width="280"
        align="center"
      >
        <template slot-scope="scoped">
          <span>
            {{ scoped.row.sktime }}/
            {{ scoped.row.mainemployeeids }}/
            {{ scoped.row.skplace }}
          </span>
        </template>
      </el-table-column>
      <el-table-column
        prop="xkyq"
        label="选课要求"
        width="170"
        show-overflow-tooltip
        align="center"
      >
        <template slot-scope="scoped">
          <span v-if="scoped.row.pyccxz !== '无限制' && scoped.row.pyccxz !== ''">{{scoped.row.pyccxz}}，</span>
          <span v-if="scoped.row.bxxz !== '无限制' && scoped.row.bxxz !== ''">{{scoped.row.bxxz}}，</span>
          <span v-if="scoped.row.xbxz !== '无限制' && scoped.row.xbxz !== ''">{{scoped.row.xbxz}}</span>
        </template>
      </el-table-column>
      <el-table-column
        prop="maxPeopleNumber"
        label="额定/最大预选人数"
        width="170"
        align="center"
      >
        <template slot-scope="scoped">
          <span>{{scoped.row.reservenum}}/</span>
          <span>{{scoped.row.maxnum}}</span>
        </template>
      </el-table-column>
      <el-table-column
        prop="PreselectionNumber"
        label="预选/正选人数"
        width="155"
        align="center"
      >
        <template slot-scope="scoped">
          <span>{{scoped.row.yxnum}}/</span>
          <span>{{scoped.row.zxnum}}</span>
        </template>
      </el-table-column>
    </el-table>
    <div class="button-style" style="width: auto; border-color: #f3b815; background-color: #fff6ef;">
      <img src="@/assets/assessment/icon-export.png" />
      <download-excel
        :data="tableData"
        :fields="jsonFields"
        type="xls"
        name="选修课开课信息.xls"
        style="color: #f3b815;">
        <span style="font-size: 14px;">导出Excel</span>
      </download-excel>
    </div>
    <div style="float: right; padding-bottom: 15px;">
      <el-pagination
        @size-change="handleSizeChange"
        @current-change="handleCurrentChange"
        :page-size="10"
        layout="total, sizes, prev, pager, next, jumper"
        :total="total"
        style="padding: 0;">
      </el-pagination>
    </div>

    <el-dialog title="提示" :visible.sync="editMessageDialog" width="500px" class="xxts">
      <div class="class-tip">
        此教学班目前处于<span v-if="kaikeStatus=='开课'">开课</span><span>停课</span>状态，您确定要<span v-if="kaikeStatus=='开课'">停课</span><span>开课</span>?
      </div>
      <span slot="footer" class="dialog-footer">
        <el-button type="success" @click="changKaikeStatus">确 定</el-button>
        <el-button
          type="warning"
          @click="cancelKaikeStatus"
          style="margin-left: 60px"
        >
          取 消
        </el-button>
      </span>
    </el-dialog>

    <el-dialog title="备注" :visible.sync="showAddMessageDialog" width="983px">
      <div class="message-container">
        <div>填写备注：</div>
        <div>
          <el-input
            v-model="meaasgeText"
            type="textarea"
            :rows="8"
            style="width: 550px"
          ></el-input>
        </div>
      </div>
      <span slot="footer" class="dialog-footer">
        <button class="green" @click="showAddMessageDialog = false">
          确 定
        </button>
      </span>
    </el-dialog>
    <el-dialog
      title="留言"
      :visible.sync="showAddMessageDialogly"
      width="983px"
    >
      <div class="message-container">
        <div>添加留言：</div>
        <div>
          <el-input
            v-model="meaasgeText"
            type="textarea"
            :rows="8"
            style="width: 550px"
          ></el-input>
        </div>
      </div>
      <span slot="footer" class="dialog-footer">
        <button class="green" @click="showAddMessageDialogly = false">
          确 定
        </button>
      </span>
    </el-dialog>
    <el-dialog
      title="查看留言"
      :visible.sync="showAddMessageDialoglys"
      width="983px"
    >
      <div class="message-container">
        <div>留言详情：</div>
        <div>
          <el-input
            v-model="meaasgeText"
            type="textarea"
            :rows="8"
            style="width: 550px"
          ></el-input>
        </div>
      </div>
      <span slot="footer" class="dialog-footer">
        <button class="green" @click="showAddMessageDialoglys = false">
          确 定
        </button>
      </span>
    </el-dialog>
    <el-dialog
      title="设置监考员"
      :visible.sync="showYprDialog"
      width="983px"
      style="height: 832px"
      class="szjky"
    >
      <div class="choose-ypr-container">
        <div class="choose-ypr-search-container">
          <span class="title">部门：</span>
          <el-select
            v-model="xq"
            style="width: 100px; margin-right: 30px"
            size="mini"
            placeholder="请选择"
          >
            <el-option
              v-for="item in xqList"
              :key="item.value"
              :label="item.label"
              :value="item.value"
            >
            </el-option>
          </el-select>
          <el-input
            style="width: 152px; margin-right: 20px"
            size="mini"
            v-model="courseYpr"
            placeholder="关键字搜索"
          >
            <i slot="prefix" class="el-input__icon el-icon-search"></i>
          </el-input>
          <div class="search-button">
            <img src="../../../../assets/assessment/icon-search.png" alt="" />
            <span>查询</span>
          </div>
          <div class="button-list">
            <div
              class="button-item"
              v-for="(item, index) in searchNameList"
              :key="index"
              @click="delTag(index)"
            >
              <img
                class="del-icon"
                src="../../../../assets/assessment/approval-del.png"
                alt=""
              />
              <div>{{ item }}</div>
            </div>
          </div>
        </div>
        <div class="choose-ypr-table-container">
          <el-table
            :data="yprList"
            border
            style="width: 100%"
            class="table-data"
            row-class-name="row-class"
            cell-class-name="cell-class"
            header-row-class-name="header-row-class"
            header-cell-class-name="header-cell-class"
          >
            <el-table-column
              prop=""
              label="选择"
              width="154"
              align="center"
              class-name=""
              label-class-name=""
            >
              <template slot-scope="scope">
                <el-checkbox></el-checkbox>
              </template>
            </el-table-column>
            <el-table-column
              prop="name"
              label="姓名"
              width="153"
              align="center"
            >
            </el-table-column>
            <el-table-column prop="sex" label="性别" width="154" align="center">
            </el-table-column>
            <el-table-column
              prop="company"
              label="单位"
              width="153"
              align="center"
            >
            </el-table-column>
            <el-table-column prop="position" label="职务" align="center">
            </el-table-column>
          </el-table>
        </div>
      </div>
      <span slot="footer" class="dialog-footer">
        <button class="green" @click="showYprDialog = false">确 定</button>
      </span>
    </el-dialog>
    <el-dialog
      title="申请调整监考"
      :visible.sync="showYprDialogs"
      width="983px"
      style="height: 832px"
      class="szjky"
    >
      <div class="assessment-edit-plan-container">
        <div class="my-form-container" style="width: 100%; height: 350px">
          <el-row class="my-form-item" style="height: 50%">
            <el-col>
              <div class="my-form-item-label">调整事由</div>
              <div class="my-form-item-value assessment-design">
                <el-input
                  v-model="design"
                  type="textarea"
                  :rows="6"
                  style="width: 625px; margin-top: 17px; margin-left: -20px"
                  placeholder="请输入内容"
                ></el-input>
              </div>
            </el-col>
          </el-row>
          <el-row class="my-form-item" style="height: 50%">
            <el-col>
              <div class="my-form-item-label">新监考员</div>
              <div
                class="my-form-item-value"
                style="margin-top: 70px; height: 100px"
              >
                <img
                  @click="sss"
                  src="../../../../assets/home/grena-anniu.png"
                  alt=""
                />
              </div>
            </el-col>
          </el-row>
        </div>
      </div>
      <span slot="footer" class="dialog-footer">
        <img
          @click="showYprDialogs = false"
          class="del-icon"
          src="../../../../assets/home/yellow-commint.png"
          alt=""
        />
      </span>
    </el-dialog>
  </div>
</template>

<script>
import {queryCommonDept, queryCommonXueqi, xxkkkgl_query_list, wsxk_wsxkList,
queryCommonJys, xxkkkgl_open, xxkkkgl_close,xxkkkgl_delete, updateByPrimaryKey} from "@/api/trainingManagement/place.js";
import { getxb, getClass, queryXBclassroom } from '@/api/course/courses'
export default {
  name: "supervisonMain",
  data() {
    return {
      editMessageDialog: false, //kaike
      kaikeStatus: "", //开课状态
      total: 0, //总条数
      pageSize: 10, //条数
      currentPage: 1, //当前页数
      selectList: [
        {
          type: "select-xq",
          name: "学期:",
          val: "",
          valList: [],
        },
        {
          type: "select",
          name: "批次:",
          val: "",
          valList: [],
        },
        {
          type: "select",
          name: "开课/停课:",
          val: "",
          valList: [
            {
              id: "1",
              name: "开课",
            },
            {
              id: "0",
              name: "停课",
            },
          ],
        },
        {
          type: "selectTree",
          name: "系:",
          val: "",
          valList: [],
        },
        {
          type: "select-jys",
          name: "教研室:",
          val: "",
          valList: [],
        },
        {
          type: "btn",
          name: "课程编号:",
          val: "",
        },
        {
          type: "btn",
          name: "课程名称:",
          val: "",
        },
        {
          type: "btn",
          name: "主讲教员:",
          val: "",
        },
      ],
      tableData: [],
      record: 0,
      design: "",
      searchNameList: [],
      xq: "",
      xqList: [],
      yprList: [],
      courseYpr: "",
      showYprDialog: false,
      showYprDialogs: false,
      showAddMessageDialog: false,
      showAddMessageDialogly: false,
      showAddMessageDialoglys: false,
      meaasgeText: "",
      course: "",
      setName: "",
      unitId: "",
      showUnitTree: false,
      selectRowInfo:{}, //当前行信息
      selectClassList: [], //已选课程列表
      jsonFields: {
        教学班: 'classname',
        课程编号: 'coursenumber',
        课程名称: 'coursename',
        上课时间: 'sktime',
        主讲教员: 'mainemployeeids',
        上课地点: 'skplace',
        选课要求: 'pyccxz',
        额定人数: 'reservenum',
        最大预选人数: 'maxnum',
        预选人数: 'preselectionnum',
        正选人数: 'positivenum'
      }
    }
  },
  created() {},
  mounted() {
    getxb().then(res => {
      if (res.data.data && res.data.data.length > 0) {
        this.selectList[3].valList = res.data.data
      }
    })
    getClass().then(res => {
      if (res.data.data && res.data.data.length > 0) {
        this.selectList[4].valList = res.data.data
      }
    })
    this.init();
  },
  methods: {
    init(){
      // this.queryCommonDept();
      this.queryCommonXueqi();
      // this.queryClass();
      // this.queryCommonJys();
      this.xxkkkgl_query_list();
    },
    async changKaikeStatus() {
      var knNo = this.selectRowInfo.classno;
      if (this.kaikeStatus == "开课") {
        const res = await xxkkkgl_close(knNo);
        if (res.data.code == 200) {
          this.$message.warning("停课成功!");
        }
      } else {
        const res = await xxkkkgl_open(knNo);
        if (res.data.code == 200) {
          this.$message.warning("开课成功!");
        }
      }
      this.cancelKaikeStatus();
    },
    cancelKaikeStatus() {
      this.editMessageDialog = false;
      this.xxkkkgl_query_list();
    },
    changeClassStatus(row) {
      // this.selectRowInfo = row;
      // this.kaikeStatus = row.status;
      // this.editMessageDialog = true;
      const operate = row.status ? '开课' : '停课'
      this.$confirm('确认教学班【' + row.classname + '】' + operate + '?', '开/停课提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        const data = {
          classNo: row.classno,
          status: row.status ? '1' : '0'
        }
        updateByPrimaryKey(data).then(res => {
          if (res.data.code === 200) {
            this.xxkkkgl_query_list()
            this.$message({
              message: operate + '成功！',
              type: 'success'
            })
          } else {
            this.$message({
              message: operate + '失败！',
              type: 'warning'
            })
          }
        })
      }).catch(() => {
        row.status = !row.status
      })
    },
    // 获取教研室
    async queryCommonJys() {
      const res = await queryCommonJys();
      if (res.data.code === 200) {
        this.selectList[4].valList = res.data.data;
      }
    },
    // 批次
    async queryClass() {
      const res = await wsxk_wsxkList(this.selectList[0].val);
      if (res.data.code === 200) {
        this.selectList[1].valList = res.data.data.records;
      }
    },
    async xxkkkgl_query_list() {
      var xueqi = this.selectList[0].val
      var status = this.selectList[2].val
      var xi = this.selectList[3].val
      var classRoom = this.selectList[4].val
      var kcbh = this.selectList[5].val
      var courseName = this.selectList[6].val
      var mainEmployeeIds = this.selectList[7].val
      var current = this.currentPage
      var size = this.pageSize
      const res = await xxkkkgl_query_list(xueqi, "", "", status,xi, classRoom, kcbh, courseName, mainEmployeeIds, current, size);
      if (res.data.code == 200) {
        this.tableData = res.data.data.records;
        this.tableData.forEach(item => {
          item.status = item.status === '1'
        })
        this.total = res.data.data.total
      }
    },
    handleSelectionChange(val) {
      this.selectClassList = val;
    },
    // 获取学期列表
    async queryCommonXueqi() {
      const res = await queryCommonXueqi();
      if (res.data.code === 200) {
        this.selectList[0].valList = res.data.data;
      }
    },
    // 获取部门
    async queryCommonDept() {
      const res = await queryCommonDept();
      if (res.data.code === 200) {
        this.selectList[3].valList = res.data.data;
        // this.selectList[3].val = this.selectList[3].valList[0].name;
        // this.unitId = this.selectList[3].valList[0].id;
      }
    },
    toShowUnitInfo(data) {
      this.selectList[3].val = data.name;
      this.unitId = data.id;
      this.showUnitTree = false;
      },
    // 调整学员
    tiaozhengStudent(row) {
      this.$router.push({
        path:"/admin/elective/adjustmentStudents",
        query:{
          classNo:row.classno
        }
      });
    },
    // 排课
    paike(row) {
      this.$router.push({
          path: "/admin/elective/workOutClass",
          query: {
            classNo: row.classno
          }
        })
    },
    // 删除
    deletedSelect: function () {
      if (this.selectClassList.length > 0) {
        this.$confirm('确认删除选中的选修课开课信息?', '操作提示', {
          confirmButtonText: '确定',
          cancelButtonText: '取消',
          type: 'warning'
        }).then(() => {
          let delList = []
          this.selectClassList.forEach(item => {
            delList.push(item.classno)
          })
          xxkkkgl_delete(delList).then(res => {
            if (res.data.code === 200) {
              this.xxkkkgl_query_list()
              this.$message.success("删除成功！")
            } else {
              this.$message.warning('删除失败！')
            }
          })
        })
      } else {
        this.$message.warning("请先选择要删除的选修课开课信息！")
      }
    },
    // 设置正选或预选人员
    setZXHYXRY() {
      if (this.selectClassList.length > 0) {
        // var queryList = []
        // this.selectClassList.forEach(item => {
        //   queryList.push(item.classno)
        // })
        this.$router.push({
          path: "/admin/elective/setPrimaryPeople",
          query: {
            queryList: this.selectClassList
          }
        })
      } else {
        this.$message.warning("请选择教学班信息！");
        return
      }
    },
    // 设置选修课要求
    setSZXXKYQ() {
      if (this.selectClassList.length > 0) {
        var queryList = []
        this.selectClassList.forEach(item => {
          queryList.push({ classNo: item.classno, className: item.classname })
        })
        this.$router.push({
          path: "/admin/elective/setClassRequire",
          query: {
            queryList: queryList
          }
        })
      } else {
        this.$message.warning("请先选择要设置的选修课开课信息！")
      }
    },
    // 从培养计划添加选修课
    addPYJXTJXXK() {
      this.$router.push("/admin/elective/addElectiveCoursesFormPlan")
    },
    // 添加选修课
    addXXK() {
      this.$router.push("/admin/elective/addElectiveCourses")
    },
    //教学班信息查看
    toTeachingView(row) {
      this.$router.push({
        path: "/admin/elective/teachingView",
        query: {
          id: row.classno
        }
      });
    },
    //课程编号 课程名称查看
    toClassNumberView(row) {
      this.$router.push({
        path: "/admin/elective/classNumberView",
        query: {
          id: row.courseid
        }
      });
    },
    // 信息编辑
    editRowInfo(row) {
      this.$router.push({
        path: "/admin/elective/editInfo",
        query:{
          id: row.classno
        }
      });
    },
    sss() {
      this.showYprDialogs = false;
      this.showYprDialog = true;
    },
    delTag(index) {
      this.searchNameList.splice(index, 1);
    },
    handleChangeDepartment: function (val) {
      this.selectList[4].val = ''
      if (val === '') {
        getClass().then(res => {
          if (res.data.data && res.data.data.length > 0) {
            this.selectList[4].valList = res.data.data
          }
        })
      } else {
        const record = this.selectList[3].valList.find(item => {
          return item.id === this.selectList[3].val
        })
        queryXBclassroom(record.deptName).then(res => {
          if (res.data.data && res.data.data.length > 0) {
            this.selectList[4].valList = res.data.data
          }
        })
      }
    },
    handleCurrentChange: function (val) {
      this.currentPage = val
      this.xxkkkgl_query_list()
    },
    handleSizeChange: function (val) {
      this.pageSize = val
      this.xxkkkgl_query_list()
    }
  },
  computed: {}, //计算属性
};
</script>
<style lang="less" scoped>
.el-switch__label * {
    line-height: 1;
    font-size: 12px;
    display: inline-block;
  }
 .el-switch__label {
    position: absolute;
    display: none;
    color: #fff !important;
    font-size: 12px !important;
  }
  /*打开时文字位置设置*/
.el-switch__label--right {
    z-index: 1;
    right: 22px;
  }
  /*关闭时文字位置设置*/
.el-switch__label--left {
    z-index: 1;
    left: 20px;
  }
  /*显示文字*/
.el-switch__label.is-active {
    display: block;
  }
   /*开关宽度*/
.el-switch .el-switch__core,
  .el-switch .el-switch__label {
    width: 50px !important;
  }

</style>
<style lang="less" scoped>
.choose-ypr-container {
  width: 767px;
  margin: 0px auto;
  .choose-ypr-search-container {
    .el-input--prefix .el-input__inner {
      padding-left: 30px;
    }
    .el-input__inner {
      &::placeholder {
        color: #b8b8b8;
      }
      &::-webkit-input-placeholder {
        /* WebKit browsers 适配谷歌 */
        color: #b8b8b8;
      }
      &:-moz-placeholder {
        /* Mozilla Firefox 4 to 18 适配火狐 */
        color: #b8b8b8;
      }
      &::-moz-placeholder {
        /* Mozilla Firefox 19+ 适配火狐 */
        color: #b8b8b8;
      }
      &:-ms-input-placeholder {
        /* Internet Explorer 10+  适配ie*/
        color: #b8b8b8;
      }
    }
    display: flex;
    flex-direction: row;
    align-items: center;
    .title {
      font-size: 18px;
      font-family: Microsoft YaHei;
      font-weight: bold;
      line-height: 20px;
      color: #004ca7;
      margin-right: 5px;
    }
    .search-button {
      width: 77px;
      height: 28px;
      line-height: 28px;
      background: #f1f8fe;
      border: 1px solid #51aef6;
      border-radius: 6px;
      cursor: pointer;
      display: flex;
      flex-direction: row;
      align-items: center;
      justify-content: center;
      > span {
        font-size: 16px;
        font-family: Microsoft YaHei;
        font-weight: 400;
        color: #51aef6;
      }
      > img {
        width: 20px;
        height: 20px;
        margin-right: 4px;
      }
    }
    .button-list {
      display: flex;
      flex-direction: row;
      align-items: center;
      margin-left: 21px;
      .button-item {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        position: relative;
        width: 69px;
        height: 27px;
        line-height: 27px;
        border: 1px solid #004ca7;
        border-radius: 4px;
        margin-right: 10px;
        text-align: center;
        font-size: 14px;
        font-family: Microsoft YaHei;
        font-weight: 400;
        color: #004ca7;
        .del-icon {
          position: absolute;
          right: 0px;
          top: 0px;
          width: 12px;
          height: 12px;
          padding: 2px;
        }
      }
    }
  }
  .choose-ypr-table-container {
    margin-top: 30px;
    .el-table td,
    .el-table th.is-leaf,
    .el-table--border,
    .el-table--group {
      border-color: #c7d7eb;
    }
    .el-table__header tr,
    .el-table__header th {
      padding: 0;
      height: 57px;
      background-color: #edf2f9;
      font-size: 16px;
      font-family: Microsoft YaHei;
      font-weight: bold;
      line-height: 20px;
      color: #004ca7;
    }
    .el-table__body tr,
    .el-table__body td {
      padding: 0;
      height: 51px;
    }
    .table-data {
      width: 100%;
      border: 0.8px solid #004ca7;
      border-radius: 9px;
      font-size: 14px;
      font-family: Microsoft YaHei;
      font-weight: 400;
      color: #004ca7;
    }
  }
}
.assessment-container {
  .el-dialog__body {
    height: 251px;
  }
  .el-dialog__footer {
    padding: 10px 20px 45px;
  }
  .el-checkbox__inner:hover {
    border-color: #004ca7;
  }
  .el-checkbox__inner {
    border: 1px solid #004ca7;
    border-radius: 0;
    height: 18px;
    width: 18px;
  }
  .el-checkbox__inner::after {
    height: 10px;
    left: 6px;
  }
  .el-checkbox__input.is-checked .el-checkbox__inner,
  .el-checkbox__input.is-indeterminate .el-checkbox__inner {
    background-color: #004ca7;
    border-color: #004ca7;
  }
  .el-checkbox__input.is-checked + .el-checkbox__label {
    color: #004ca7;
  }
  .el-checkbox.is-bordered.is-checked {
    border-color: #004ca7;
  }
  .el-checkbox__input.is-focus .el-checkbox__inner {
    border-color: #004ca7;
  }
}
</style>
<style lang="less" scoped>
@import "../../../../styles/text.less";
.assessment-container .table-container {
  // overflow: scroll;
}
.assessment-container .table-container .table-header {
  width: 1935px;
}
.assessment-container .table-container .table-body {
  width: 1935px;
}
/deep/ .szjky .el-dialog__body {
  height: 432px;
}
.pagination-block {
  margin-top: 20px;
  display: flex;
  flex-direction: row;
  justify-content: center;
}
.message-container {
  > div {
    display: inline-block;
    &:nth-child(1) {
      padding-left: 111px;
      font-size: 20px;
      color: rgba(0, 76, 167, 1);
      font-weight: bold;
      vertical-align: top;
    }
    &:nth-child(2) {
    }
  }
}
</style>
<style lang="less" scoped>
@import "../../../../styles/supervision.less";

.wrapper-container {
  width: calc(100% - 20px);
  margin: 0 auto;
}

/deep/ .table-container {
  .el-table td,
  .el-table th.is-leaf,
  .el-table--border,
  .el-table--group {
    border-color: #c7d7eb;
  }

  .el-table__header tr,
  .el-table__header th {
    padding: 0;
    height: 76px;
    background-color: #edf2f9;
    font-size: 16px;
    font-family: Microsoft YaHei;
    font-weight: bold;
    line-height: 20px;
    color: #004ca7;
  }

  .el-table__body tr,
  .el-table__body td {
    padding: 0;
    height: 86px;
  }

  .wrapper-button {
    display: flex;
    flex-direction: column;
    align-items: center;

    > div {
      margin-bottom: 8px;
    }
  }
  .table-data {
    width: 100%;
    border: 0.8px solid #004ca7;
    border-radius: 9px;
    font-size: 14px;
    font-family: Microsoft YaHei;
    font-weight: 400;
    color: #004ca7;
  }
}

.wrapper-container .search-container .search-container-left {
  flex-wrap: wrap;
  .search-container-item {
    width: 12%;
    margin-right: 0px;
    .box {
      > span {
        text-align: left;
      }
      display: flex;
      justify-content: space-evenly;
      margin-bottom: 20px;
      align-items: center;
      /deep/ .el-input__inner {
        height: 28px;
      }
    }
  }
}

/deep/.el-date-editor.el-input {
  width: 110px;
}
/deep/ .el-input--medium {
  width: 110px;
  .el-input__inner {
    height: 28px;
    width: 110px;
    padding: 0px 18px;
  }
}
/deep/ .el-table thead {
  color: #004ca7 !important;
}


.xxts {
  /deep/ .el-dialog {
    height: 320px;
  }
}

.btn {
  margin-top: 271px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 271px;
  .submit {
    width: 84px;
    height: 27px;
    line-height: 8px;
  }
}
.bottom-block {
  // display: flex;
  flex-direction: row;
  justify-content: space-between !important;
  .export-button {
    width: 127px;
    height: 27px;
    background: #fff6ef;
    border: 1px solid #f3b815;
    border-radius: 4px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    margin-top: 14px;
    > img {
      width: 17px;
      height: 17px;
    }
    > span {
      margin-left: 12px;
      font-size: 14px;
      font-family: Microsoft YaHei;
      font-weight: 400;
      color: #f3b815;
    }
  }
  .text {
    font-size: 14px;
    font-family: Microsoft YaHei;
    font-weight: 400;
    line-height: 39px;
    color: #004ca7;
  }
}

.a-span {
  text-decoration: underline;
  cursor: pointer;
}

.assessment-container {
  width: calc(100% - 20px);
  .table-container {
     width: 100%;
  }
}

.class-tip {
  color: #004ca7;
  font-size: 16px;
  font-weight: bold;
  text-align: center;
  margin: 40px;
}

.assessment-container {
  width: calc(100% - 20px);
  .table-container {
     width: 100%;
  }
}
/deep/ .el-tree-node {
  color: #004ca7;
}


















  .button-style {
    float: left;
    background: #f1f8fe;
    border: 1px solid #51aef6;
    width: auto;
    height: 28px;
    line-height: 28px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    flex-wrap: nowrap;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    padding: 3px 10px;
    box-sizing: border-box;
    > img {
      width: 16px;
      height: 16px;
      margin-right: 5px;
    }
    > span {
      font-size: 14px;
      color: #51aef6;
    }
  }
  @fontFamily:"Microsoft YaHei";
  .xpaas-table-class {
    border: 1px solid #004ca7;
    border-radius: 9px;
    ::v-deep div.el-table__header-wrapper {
      table.el-table__header {
        thead {
          tr.xpaas-header-row-class {
            padding: 0;
            height: 60px;
            background-color: #edf2f9;
            font-size: 16px;
            font-family: @fontFamily;
            font-weight: bold;
            line-height: 20px;
            color: #004ca7;
            th.xpaas-header-cell-class {
              font-weight: bold;
              border-right: 1px solid #c7d7eb;
              border-left: 0;
              border-bottom: 1px solid #c7d7eb;
              background-color: #edf2f9;
              div.cell {
                font-size: 16px;
                font-weight: bold;
                font-family: @fontFamily;
                color: #004ca7;
              }
            }
          }
        }
      }
    }
    ::v-deep div.el-table__body-wrapper {
      table.el-table__body {
        tbody {
          tr.xpaas-row-class {
            td.xpaas-header-cell-class {
              border-right: 1px solid #c7d7eb;
              border-left: 0;
              border-bottom: 1px solid #c7d7eb;
              background-color: #edf2f9;
              div.cell {
                font-size: 16px;
                font-weight: bold;
                font-family: @fontFamily;
                color: #004ca7;
              }
            }
            td.xpaas-cell-class {
              height: 60px;
              border-right: 1px solid #c7d7eb;
              border-left: 0;
              border-bottom: 1px solid #c7d7eb;
              div.cell {
                font-family: @fontFamily;
                color: #004ca7;
              }
            }
          }
        }
      }
    }
  }
  /deep/ .el-form-item__label {
    color: #004ca7;
    font-size: 14px;
  }
</style>
